package fjut.acm.coding.service.Impl;

import fjut.acm.coding.entity.ProblemStarPO;
import fjut.acm.coding.mapper.ProblemStarMapper;
import fjut.acm.coding.service.ProblemStarService;
import org.springframework.stereotype.Service;

import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import java.util.List;


@Service
public class ProblemStarServiceImpl implements ProblemStarService {

    @Resource
    ProblemStarMapper problemStarMapper;

    @Override
    public List<ProblemStarPO> selectStar(Integer problemId) {
        Example example = new Example(ProblemStarPO.class);
        example.createCriteria().andEqualTo("problemId", problemId);
        return problemStarMapper.selectByExample(example);
    }
}
